package Model;

import java.util.HashSet;
import Controller.RideInfo;


public class EscortImpl implements Escort {

	private int id;
	private int password;
	private BankAccountDetails account;
	private HashSet<Kid> kids;
	
	public EscortImpl(BankAccountDetails account) {
		this.account = account;
		kids = new HashSet<Kid>();
		id = this.hashCode();
	}
	
	public int  getID() {
		return id;
	}
	@Override //return UUID?
	public void addKid(String name, int age, int height) {
		Kid kid = KidImpl.newInstance(name, age, height, this);
		if(kid != null)
			kids.add(kid);
		//else throw exception?
	}

	@Override
	public void removeKid(int kidID) {
		/*Kid kid; //= find kid in DB
		kids.remove(kid);*/
	}

	//unify buy/cancel tickets?
	@Override
	public boolean buyTickets(int kidID, RideInfo rideInfo, int amount) {
		/*Kid kid; //= find kid in DB
		kid.updateTickets(rideInfo, amount);*/
		return true;
	}

	@Override
	public boolean cancelTickets(int kidID, RideInfo rideInfo, int amount) {
		/*Kid kid; //= find kid in DB
		kid.updateTickets(rideInfo, amount);*/
		return true;
	}

	@Override
	public void charge(double price) {
		//??
	}

	@Override
	public int getNumOfKids() {
		return kids.size();
	}

}
